module.exports = {
    // get isIOS() {
    //   const iosReg = /iphone|ipad|ipod/i;
    //   return iosReg.test(this.get('user-agent'));
    // },
    success(data){
      this.body = {
        code:200,
        data:data
      }
    },
    error(codeInfo,obj){
      if(obj){
        if(typeof obj == "string"){
          this.body = Object.assign({},codeInfo,{msg:obj})
        }else{
          this.body = Object.assign({},codeInfo,obj)
        }
      
      }else{
        this.body = codeInfo;
      }
    }
  };